package org.web.ssm.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by hubin on 2016/6/16.
 */
public class DateUtils {

    public static Date stringToDate(String dstr) throws  Exception{
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");//小写的mm表示的是分钟
        Date date = null;
        date = sdf.parse(dstr);
        return date;
    }
}
